//
//  CrazyChatBaseViewController.m
//  webSocket
//
//  Created by 马军凯 on 2019/2/18.
//  Copyright © 2019年 ZH. All rights reserved.
//

#import "CrazyChatBaseViewController.h"

@interface CrazyChatBaseViewController ()

@end

@implementation CrazyChatBaseViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = [UIColor whiteColor];
    self.edgesForExtendedLayout = UIRectEdgeNone;
    //创建导航栏
    [self createNavigationLeftItem];
}

#pragma mark 返回按钮
- (void)createNavigationLeftItem {
    //返回
    UIButton *btn = [UIButton buttonWithType:UIButtonTypeCustom];
    btn.frame = CGRectMake(0, 0, 30, 30);
    btn.layer.masksToBounds = YES;
    [btn setImage:[UIImage imageNamed:@"Crazy_chat_back@2x.png"] forState:UIControlStateNormal];
    [btn addTarget:self action:@selector(CrazyChatBack) forControlEvents:UIControlEventTouchUpInside];
    self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:btn];
}
//点击
- (void)CrazyChatBack {
    [self.navigationController popViewControllerAnimated:YES];
}










/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
